//
//  licensePlateList.m
//  WHB_logist
//
//  Created by 徐国庆 on 15/12/22.
//  Copyright (c) 2015年 turing. All rights reserved.
//

#import "licensePlateList.h"

@implementation licensePlateList

+(NSDictionary*)JSONKeyPathsByPropertyKey{
    
    
    return @{
             @"truckId":@"truckId",
             @"licensePlate":@"licensePlate",
             @"startAddressName":@"startAddressName",
             @"endAddressName":@"endAddressName",
             @"mediumName":@"mediumName",
             @"weight":@"weight",
             @"volume":@"volume",
             @"truckStatus":@"truckStatus",
             @"driverName":@"driverName",
            };
}

#pragma mark -
#pragma mark 对字段值进行转换 方法名称格式为:属性+JSONTransformer 否则框架无法识别转换方法
//amount
+(NSValueTransformer*)amountJSONTransformer{
    
    return [MTLValueTransformer reversibleTransformerWithBlock:^id(NSString *amout) {
        return @(amout.floatValue);
    }];
}

//realPrice
+(NSValueTransformer*)realPriceJSONTransformer{
    
    return [MTLValueTransformer reversibleTransformerWithBlock:^id(NSString *realPrice) {
        return @(realPrice.floatValue);
    }];
}


@end
